package com.yaoxun.console.context;

import com.yaoxun.console.xo.dto.LoginSession;

public class SubjectContextHolder {

	private static final InheritableThreadLocal<LoginSession> CONTEXT_HOLDER = new InheritableThreadLocal<>();

    public static void clearContext() {
        CONTEXT_HOLDER.remove();
    }

    public static LoginSession getContext() {
        return CONTEXT_HOLDER.get();
    }

    public static void setContext(LoginSession session) {
        CONTEXT_HOLDER.set(session);
    }
	
}
